![]() |
OpenComponent |
||||
Header: | Components.h | Carbon status: | Supported | |
Opens a connection to the component with the component identifier specified by your application.
ComponentInstance OpenComponent ( Component aComponent );
The component you wish to open. Your application obtains this identifier from the FindNextComponent function. If your application registers a component, it can also obtain a component identifier from the RegisterComponent function or the RegisterComponentResource function.
A component instance which identifies your application’s connection to the component. You must supply this component instance whenever you call the functions provided by the component. When you close the component, you must also supply this component instance to the CloseComponent function.
If it cannot open the specified component, the function returns NULL.
Your application must open a component before it can call any component functions. To use this function, you must already have obtained a component identifier. Alternatively, you can use the OpenDefaultComponent function to open a component without calling FindNextComponent.
Note that your application may maintain several connections to a single component, or it may have connections to several components at the same time.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)